// 引入工具类
import axios from '../config'

// 使用
const URL = 'api-ftp' // 公共前缀地址
export const curveRule = {
	//分页查询 查询所有业务元素
	findAll(data) {
		return axios.post(URL + '/ftp/curveRule/findAll', data)
	},
	save(data) {
		return axios.post(URL + '/ftp/curveRule/save', data)
	},
	findCurveRuleByCode(data) {
		return axios.post(URL + '/ftp/curveRule/findCurveRuleByCode', data)
	},
	remove(data) {
		return axios.post(URL + '/ftp/curveRule/remove', data)
	},
	checkUniqueByDateRange(data) {
		return axios.post(URL + '/ftp/curveRule/checkUniqueByDateRange', data)
	},
	toForm(data) {
		return axios.post(URL + '/ftp/curveRule/toForm', data)
	},
	//查询历史
	findHistory(data){
		return axios.post(URL + '/ftp/curveRule/findHistory', data)
	},
	//导出模板
	exp(data) {
		return axios.exportFile(URL + '/ftp/curveRule/exp', data, false)
	},
	//导入模板
	imp(data) {
		return axios.fileUpload(URL + '/ftp/curveRule/imp', data, false)
	},


    //查询规则组列表数据
	findAll_grp(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/findAll', data)
	},
	//查询规则树列表数据
	curveRuleGroupTree(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/curveRuleGroupTree', data)
	},
	//删除规则组
	curveRuleGroupRemove(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/remove', data)
	},
	//保存规则组
	curveRuleGroupSave(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/save', data)
	},
	//跳转ToForm
	toFormGroup(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/toForm', data)
	},
	//checkCode
	checkCode(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/checkCode', data)
	},
	//检查名称是否重复
	checkNameUnique(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/checkNameUnique', data)
	},
	//规则组是否被情景引用
	checkUsingGroup(data) {
		return axios.post(URL + '/ftp/curveRuleGroup/checkUsing', data)
	},
}




